<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>各项目收缴率排名</title>
		<link rel="stylesheet" href="css/index.css" />
		<link rel="stylesheet" href="../plugin/layui/css/layui.css"/>

	</head>
	<body>
		<!-- <header>
			<div><h3>各项能耗情况</h3></div>
		</header> -->
		<div class="layui-row" style="height:100%;width: 98%;margin: 0 auto;">

			<div id="yearEneryChart" class="layui-col-sm12" style="height: 100%;"></div>
		</div>
		<script src="../js/jquery-2.1.1.min.js"></script>
		<script src="../js/echarts.min.js"></script>
		<script src="js/yearEnery.js"></script>
		<script src='../js/index9.js'></script><!-- 年度能耗 -->
		<script type="text/javascript">
			var dataJsons = [];
			$(document).ready(function(){
				dataJsons = [[7,9.6,21.6,22.6,38,40,45.5,48.7,49.5,50,55,65,71],
							[16,25,45,55,65,66,68.6,70.5,70.7,80.5,90.7,100,132],
							[8,9.8,10.5,35.5,50,51.5,52.3,60,71.6,72.6,86,88.9,95.5],
							[35,37.9,45.5,56.5,63.5,77.8,88.9,88.9,88.9,95,95,100,100],
							[8,9.8,10.5,35.5,50,51.5,52.3,60,71.6,72.6,86,88.9,95.5],
							[45,47.9,59.5,66.5,73.5,87.8,88.9,95.6,99.8,100,100,100,100],
							[8,9.8,10.5,35.5,50,51.5,52.3,60,71.6,72.6,86,88.9,95.5]
							];

				// echarts.connect([yearEneryChart,yearEnergy]);
				// yearEnergy.on("click", eConsole);
				eConsole();
			})

			function eConsole(param){
				console.log(param.dataIndex);
				if (typeof param.seriesIndex != 'undefined') {
					if (param.type == 'click') {      //判断事件类型：点击
						var datas = dataJsons[param.dataIndex];
						yearEneryChart.setOption({ //加载数据图表
                          series: {
                                // 根据名字对应到相应的系列
                                data: datas
                         	}
						})
					}
				}
			}
		</script>
	</body>
</html>
